package com.example.lottery_system.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum UserIdentity {

    ADMIN("管理员"),
    NORMAL("普通用户");
    private final String message;

    public static UserIdentity forName(String name) {
        for (UserIdentity userIdentity : UserIdentity.values()) {
            if(userIdentity.name().equalsIgnoreCase(name)) {
                return userIdentity;
            }
        }
        return null;
    }
}
